package utils

const (
	LocalKubernetesName     = "kubernetes"
	DefaultKubernetesPort   = "36443"
	DefaultLocalK3sRegistry = "k3s:v1.25.16-k3s4"
	DefaultK3sPause         = "mirrored-pause:3.6"
	CniPluginPrefix         = "cni-plugins-linux-"
	NerdCtl                 = "/usr/bin/nerdctl"
	KubeCtl                 = "/usr/bin/kubectl"

	DefaultLocalRegistry      = "0.0.0.0:40443/kubernetes/"
	LocalImageRegistryName    = "bocloud_image_registry"
	LocalYumRegistryName      = "bocloud_yum_registry"
	LocalChartRegistryName    = "bocloud_chart_registry"
	LocalNFSRegistryName      = "bocloud_nfs_registry"
	DefaultLocalImageRegistry = "registry:2.8.1"
	DefaultLocalYumRegistry   = "nginx_yum_repo:1.23.0-alpine"
	DefaultLocalChartRegistry = "chartmuseum:v0.16.2"
	DefaultLocalNFSRegistry   = "nfs-server-alpine:0.9.0"
	PatchImageRegistryName    = "bke-patch-image-registry"

	DefaultChartRegistryPort = "38080"

	LocalNTPName         = "local"
	DefaultNTPServerPort = 123

	DefaultExtendManifestsDir = "/etc/openFuyao/addons/manifests"
)

// Defines the default file location
const (
	ImageFile           = "volumes/registry.image"
	ImageDataFile       = "volumes/image.tar.gz"
	ImageDataDirectory  = "mount/image_registry"
	SourceDataFile      = "volumes/source.tar.gz"
	SourceDataDirectory = "mount/source_registry"
	ChartDataFile       = "mount/source_registry/files/charts.tar.gz"
	PatchDataDirectory  = "mount/source_registry/files/patches"
	ChartDataDirectory  = "mount/charts"
	NFSDataFile         = "mount/source_registry/files/nfsshare.tar.gz"
	NFSDataDirectory    = "mount/nfsshare"
	RPMDataFile         = "rpm.tar.gz"
	ChartFile           = "charts.tar.gz"
)

// Defines the patch config map data
const (
	// PatchKeyPrefix is prefix for patch key in configmap
	PatchKeyPrefix = "patch."
	// PatchValuePrefix is prefix for patch value in configmap
	PatchValuePrefix = "cm."
	// PatchNameSpace is the namespace of patch config map
	PatchNameSpace = "openfuyao-patch"
)

const (
	KylinDocker = "docker-24.0.7-kylin-{.arch}.tar.gz"
)

const (
	// MaxRetryCount defines the maximum retry count for retryable operations.
	MaxRetryCount = 3
	// DelayTime defines the delay time between retries.
	DelayTime = 1
	// MinDiskSpace defines the minimum disk space required for the init operation.
	MinDiskSpace = 20
	// HttpUrlFields defines fields num in http url
	HttpUrlFields = 2
)

const (
	// DefaultDirPermission Linux Default Dir Permission
	DefaultDirPermission = 0755
	// DefaultFilePermission Linux Default File Permission
	DefaultFilePermission = 0644
	// SecureFilePermission Linux Secure File Permission
	SecureFilePermission = 0600
)

const (
	// DefaultMinCheckSeconds min check time
	DefaultMinCheckSeconds = 5
	// DefaultMaxCheckSeconds max check time
	DefaultMaxCheckSeconds = 20
)
